var router = require('router');

router.config({
    container:'.l-main',
    onAfter:function(){
        var target = this.target;
        $('.menu-box a.s-crt').removeClass('s-crt');
        if(target){
            target = $(target);
            if(target.length){
                target.addClass('s-crt').closest('.menu-item').addClass('s-show')
            }
            else{
                router.location('/home/')
            }
        }
    }
})

return function(){

    //账套首页
    router(require('../pages/home/main'))

    //录凭证
    router(require('../pages/voucher/record/main'))

    //查凭证
    router(require('../pages/voucher/list/main'))

    //系统消息
    router(require('../pages/message/message'))

    //系统消息详情
    router(require('../pages/message/messageDetail'))

    //我的问题
    router(require('../pages/message/question'))

    //建议反馈
    router(require('../pages/message/suggest'))

    //总账
    router(require('../pages/books/generalLedger/main'))

    //明细账
    router(require('../pages/books/subsidiaryLedger/main'))

    //数量金额（外币）明细账
    router(require('../pages/books/subsidiaryLedgerAmt/main'))

    //辅助核算明细账
    router(require('../pages/books/subsidiaryLedgerAux/main'))

    //科目余额表
    router(require('../pages/books/balance/main'))

    //数量金额（外币）余额表
    router(require('../pages/books/balanceAmt/main'))

    //辅助核算余额表
    router(require('../pages/books/balanceAux/main'))

    //资产负债表
    router(require('../pages/statements/balancesheet/main'))

    //利润表
    router(require('../pages/statements/profit/main'))

    //利润表季报
    router(require('../pages/statements/profitQuarterly/main'))

    //现金流量表
    router(require('../pages/statements/cashflow/main'))

    //现金流量表
    router(require('../pages/statements/cashflowQuarterly/main'))

    //系统设置
    router(require('../pages/initialize/setting/main'))

    //科目管理
    router(require('../pages/initialize/subjectManage/main'))

    //期初余额
    router(require('../pages/initialize/initialBalance/main'))

    router.start();
}